﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;

namespace RollBack.src.ui
{
    /// <summary>
    /// Singleton class to get all the image resources.
    /// </summary>
    /// 
    class ImageResources
    {
        public static ImageResources m_resources = new ImageResources();
        public ImageList m_imageList
        {
            get;
            set;
        }

        /// <summary>
        /// The index values of the various image resource in the image list.
        /// </summary>
        public class Indexes
        {
            public static int m_playButtonImage = 0;
            public static int m_saveButtonImage = 1;
            public static int m_saveMultipleButtonImage = 2;
            public static int m_playButtonDisabledImage = 3;
            public static int m_pauseButtonImage = 4;
            public static int m_settingsButtonImage = 5;
            public static int m_scheduleClockImage = 6;
            public static int m_includeFolderImage = 7;
            public static int m_stopButtonImage = 8;
            public static int m_historicalGraphImage = 9;
            public static int m_restoreBackupImage = 10;
            public static int m_logMessageImage = 11;
            public static int m_folderIconOpen = 12;
            public static int m_folderIconClosed = 13;
            public static int m_notificationImage = 14;
        }


        ImageResources()
        {
            m_imageList = new ImageList();
            m_imageList.ColorDepth = ColorDepth.Depth32Bit;
            //m_imageList.ImageSize = new Size(m_imageList.ImageSize.Width, m_imageList.ImageSize.Height + 10);
            m_imageList.TransparentColor = System.Drawing.Color.Transparent;
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.PlayButtonImage);    //0
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.SaveButtonImage);    //1
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.SaveMultipleButtonImage);    //2
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.PlayButtonDisabledImage);    //3
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.PauseButtonImage);           //4
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.SettingsButtonImage);        //5
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.ScheduleClockImage);         //6
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.IncludeFolder);              //7
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.StopButtonImage);            //8
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.HistoricalGraphImage);       //9
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.RestoreBackupImage);         //10
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.LogMessages);                //11
            Icon iconOpen = Etier.IconHelper.IconReader.GetFolderIcon(Etier.IconHelper.IconReader.IconSize.Small, Etier.IconHelper.IconReader.FolderType.Open);
            Icon iconClosed = Etier.IconHelper.IconReader.GetFolderIcon(Etier.IconHelper.IconReader.IconSize.Small, Etier.IconHelper.IconReader.FolderType.Closed);

            m_imageList.Images.Add(iconOpen);   //12
            m_imageList.Images.Add(iconClosed); //13
            m_imageList.Images.Add(global::RollBackUI.Properties.Resources.NotificationImage);          //14
        }

        /// <summary>
        /// load other standard icons like folder open/close etc
        /// </summary>
        private void loadStandardImages()
        {
        }
    }
}
